<?php if ($this->list) { ?>
	<?php $unread_num = count($this->list); $this->list = array_slice($this->list, 0, 5); ?>
	<?php foreach($this->list AS $key => $val) { ?>
	<li class="notification">
		<p>
			<span class="message"><?php echo $val['message']; ?></span>
		</p>
		<p class="more">
			<span class="text-color-999"><?php echo date_friendly($val['add_time']); ?></span>
			<?php if ($val['extend_message']) { ?>
			 • 
			<a class="text-color-999" onclick="$('#extend_message_<?php echo $val['notification_id']; ?>').fadeIn();$(this).hide();">展开</a>
			<?php } ?>

			<a class="pull-right read text-color-999" onclick="AWS.Message.read_notification($(this).parents('.notification'), <?php echo $val['notification_id']; ?>, false)">
				标为已读
			</a>
		</p>
		<div class="collapse" id="extend_message_<?php echo $val['notification_id']; ?>">
			<small><?php if ($val['extend_message']) { ?>
			<p><?php echo implode('</p><p>', $val['extend_message']); ?></p>
			<?php } ?></small>
		</div>
	</li>
	<?php } ?>
<?php } ?>